package com.jin.concurrent.example.immutable;

import com.alibaba.fastjson.JSON;
import com.google.common.collect.Maps;
import com.jin.concurrent.annoations.NotThreadSafe;
import lombok.extern.slf4j.Slf4j;

import java.util.Map;

/**
 * @author JinLiu
 */
@Slf4j
@NotThreadSafe
public class ImmutableExample1 {

    private final static Integer a = 1;
    private final static String b = "2";
    private final static Map<Integer, Integer> map = Maps.newHashMap();

    static {
        map.put(1, 2);
        map.put(3, 4);
        map.put(5, 6);
        map.put(7, 8);
    }

    public static void main(String[] args) {
        map.put(1, 5);

        log.info("{}", JSON.toJSONString(map));
    }

    private static void test(final int a) {

    }

}
